let path=require('path')
let HtmlWebPackPlugin=require("html-webpack-plugin")
let {VueLoaderPlugin}=require("vue-loader")
module.exports={
    mode:"development",
    entry:'./src/index.js',
    output:{
        path: path.join(__dirname, 'build'),
        filename: 'js/index.js'
    },
    plugins:[
        new HtmlWebPackPlugin({
            template:"./src/index.html"
        }),
        new VueLoaderPlugin()
    ],
    devServer:{
        port:1234,
        hot:true,
        open:true,
        
    },
    module:{
        rules:[
            {
                test:/\.(css|less)$/i,
                use:['style-loader','css-loader','less-loader']
            },
            {
                test:/\.js$/i,
                exclude:/node_modules/,
                use:'babel-loader'
            },
            // {
            //     test:/.\(png|jpg|jpeg|webp)$/i,
            //     type:'asset'
            // },
            {
                test:/\.vue$/,
                loader:'vue-loader'
            }
        ]
    }
}